<%-- 
    Document   : processLogin
    Created on : May 10, 2012, 1:28:09 PM
    Author     : admin
--%>

<%@ page session="false" %>
<jsp:useBean id="proses" scope="page" class="bean.Login" />
<%
if (proses.login(request.getParameter("userName"),
request.getParameter("password")))
request.getRequestDispatcher("HalamanAdmin.jsp").forward(request, response);
else
//we have to use sendRedirect because we want to send the ?error part
//to the Login.jsp page.
//with RequestDispatcher.forward(), the URL will still be
//the current URL
response.sendRedirect("FormLogin.jsp?error=yes");
%>
